<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>prefix</title>
</head>

<body>
    <script>
        const prefix = prop => {
            const capitalizedProp = prop.charAt(0).toUpperCase() + prop.slice(1);
            const prefixes = ['', 'webkit', 'moz', 'ms', 'o'];
            const i = prefixes.findIndex(
                prefix =>
                    typeof document.body.style[prefix ? prefix + capitalizedProp : prop] !==
                    'undefined'
            );
            return i !== -1 ? (i === 0 ? prop : prefixes[i] + capitalizedProp) : null;
        };
        document.writeln(prefix('appearance'));
    </script>
</body>

</html>